import {
	axios
} from '@/axios/vue-axios'

const api = {
	Login: '/system/login',
	GetUserInfo: '/ananjt/user/getUserInfo',
	Logout: '/system/removeToken',
	ForgePassword: '/forge-password',
	Register: '/register',
}

export default api

// 登录
export function login(parameter) {
	return axios({
		url: api.Login,
		method: 'post',
		params: parameter,
		headers: {
			'Content-type': 'application/x-www-form-urlencoded;charset=UTF-8'
		}
	})
}

export function getUserInfo(parameter) {
	return axios({
		url: api.GetUserInfo,
		method: 'post',
		data: parameter,
		headers: {
			'Content-type': 'application/x-www-form-urlencoded;charset=UTF-8'
		}
	})
}

export function logout(params) {
	return axios({
		url: api.Logout,
		method: 'get',
		params: params,
		headers: {
			'Content-type': 'application/x-www-form-urlencoded;charset=UTF-8'
		}
	})
}
